(function ( exports ) {

    //region MappableNode

    function MappableNode () {
    }

    MappableNode.prototype = {
        deserialize: function ( node ) {
            (new COSA.Xml.TypedNodeMapper(this))
                .useMap(this.getMap())
                .applyValues(node.namedNodes());

            return this;
        },
        getMap: function () { return {}; },
        getInstance: function () {},
        getBase: function () {
            return Object.getPrototypeOf(this.constructor.prototype);
        }
    };

    //endregion MappableNode

    //region ExtensibleObject

    function ExtensibleObject ( obj ) {
        this.obj = obj;
    }

    ExtensibleObject.prototype = {
        extendWith: function ( source ) {
            for ( var prp in source ) {
                this.obj[prp] = source[prp];
            }
            return this;
        },
        result: function () {
            return this.obj;
        }
    };

    //endregion ExtensibleObject



    exports.MappableNode = MappableNode;
    exports.ExtensibleObject = ExtensibleObject;

})(COSA);